<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0043)http://localhost:8080/mango/cart/list.jhtml -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<title>Order</title>
<link href="${ pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css"/>
<link href="${ pageContext.request.contextPath}/css/cart.css" rel="stylesheet" type="text/css"/>

</head>
<body>

<div class="container">

		<%@ include file="menu.jsp" %>

</div>	

<div class="container cart">

		<div class="span24">
		
			<div class="step step1">
				<ul>
					
					<li  class="current"></li>
					<li ><center><h3>生成订单成功</h3></center> </li>
				</ul>
			</div>
	
		
				<table>
					<tbody>
					<tr>
						<th align="center" colspan="5">订单编号：<s:property value="model.oid"/>
						&nbsp;&nbsp; 订单状态：<s:property value="model.state"/>   </th>
					</tr>
					<tr>
						<th>图片</th>
						<th>商品</th>
						<th>价格</th>
						<th>数量</th>
						<th>小计</th>
						<!-- <th>操作</th> -->
					</tr>
					<s:iterator var="oI" value="model.orderItems" >
						<tr>
							<td width="60">
								<input type="hidden" name="id" value="22"/>
								<img src="${pageContext.request.contextPath}/<s:property value="#oI.product.image"/>"/>
							</td>
							<td>
								<a target="_blank" href="${pageContext.request.contextPath }/product_findByPid.action?pid=<s:property value="#oI.product.pid"/>">
								<s:property value="#oI.product.pname"/></a>
							</td>
							<th>
								<s:property value="#oI.product.shop_price"/>
							</th>
							<td class="count" width="5%">
								<s:property value="#oI.count"/>
							</td>
							<td width="140">
								<span class="subtotal">￥<s:property value="#oI.subtotal"/></span>
							</td>
							<!-- <td>
								<a href="./cart_removeCart.action?pid=1" class="delete">删除</a>
							</td> -->
						</tr>
					</s:iterator>
				</tbody>
			</table>
				<dl id="giftItems" class="hidden" style="display: none;">
				</dl>
				<div class="total">
					<em id="promotion"></em>
					商品金额: <strong id="effectivePrice">￥<s:property value="model.total"/>元</strong>
				</div>
			<form id="orderForm" action=" ${pageContext.request.contextPath }/order_payOrder.action" method="post">
				
				<div class="span24">
					<p>		
							订单号 ： <s:property value="model.oid"/> <input type="hidden" name="oid"  value="<s:property value="model.oid"/>" /> <br/>
							原收货地址&nbsp;&nbsp;&nbsp;：<s:property value="model.user.addr"/>
								<input name="addr" type="hidden" value="<s:property value="model.user.addr"/>" style="width:350px" /><br />
							<h3><font color="red" >新地址：</font> </h3>
							<br /> 
							<br /> 
								<select name="province" id = "provinceid" onchange="change(this.value);" >
											<option  value ="0">--请选择--</option>
											<option  value ="江苏">江苏</option>
											<option  value ="山东">山东</option>
											<option  value ="浙江">浙江</option>
											<option  value ="辽宁">辽宁</option>
								</select>省   &nbsp;&nbsp;&nbsp;
								
								<select name="city" id = "cityid" >
								</select>市 &nbsp;&nbsp;&nbsp;
								<input name="town" type="text" />区/镇/区&nbsp;&nbsp;&nbsp;
								<%-- <input name="addr" type="text" value="<s:property value="model.user.addr"/>" style="width:350px" /> --%>
								<br /> 
								<br /> 
							收货人&nbsp;&nbsp;&nbsp;：<input name="name" type="text" value="<s:property value="model.user.name"/>" style="width:150px" />
								<br /> 
								<br /> 
							联系方式：<input name="phone" type="text"value="<s:property value="model.user.phone"/>" style="width:150px" />
							<br /> 

						</p>
						<hr />
						<p>
							选择银行：<br/>
							<input type="radio" name="pd_FrpId" value="ICBC-NET-B2C" checked="checked"/>工商银行
							<img src="${pageContext.request.contextPath }/bank_img/icbc.bmp" align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="pd_FrpId" value="BOC-NET-B2C"/>中国银行
							<img src="${pageContext.request.contextPath }/bank_img/bc.bmp" align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="pd_FrpId" value="ABC-NET-B2C"/>农业银行
							<img src="${pageContext.request.contextPath }/bank_img/abc.bmp" align="middle"/>
							<br/>
							<input type="radio" name="pd_FrpId" value="BOCO-NET-B2C"/>交通银行
							<img src="${pageContext.request.contextPath }/bank_img/bcc.bmp" align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="pd_FrpId" value="PINGANBANK-NET"/>平安银行
							<img src="${pageContext.request.contextPath }/bank_img/pingan.bmp" align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="pd_FrpId" value="CCB-NET-B2C"/>建设银行
							<img src="${pageContext.request.contextPath }/bank_img/ccb.bmp" align="middle"/>
							<br/>
							<input type="radio" name="pd_FrpId" value="CEB-NET-B2C"/>光大银行
							<img src="${pageContext.request.contextPath }/bank_img/guangda.bmp" align="middle"/>&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="radio" name="pd_FrpId" value="CMBCHINA-NET-B2C"/>招商银行
							<img src="${pageContext.request.contextPath }/bank_img/cmb.bmp" align="middle"/>
						</p>
						<hr />
						<p style="text-align:right">
							<a href="javascript:document.getElementById('orderForm').submit();">
								<img src="${ pageContext.request.contextPath}/images/finalbutton.gif" width="204" height="51" border="0" />
							</a>
						</p>
				</div>
			</form>
		</div>
		
	</div>
<div class="container footer">
	<div class="span24">
		<div class="footerAd">
					<img src="image\r___________renleipic_01/footer.jpg" alt="我们的优势" title="我们的优势" height="52" width="950">
</div>
</div>
	<div class="span24">
		<ul class="bottomNav">
					<li>
						<a href="#">关于我们</a>
						|
					</li>
					<li>
						<a href="#">联系我们</a>
						|
					</li>
					<li>
						<a href="#">诚聘英才</a>
						|
					</li>
					<li>
						<a href="#">法律声明</a>
						|
					</li>
					<li>
						<a>友情链接</a>
						|
					</li>
					<li>
						<a target="_blank">支付方式</a>
						|
					</li>
					<li>
						<a target="_blank">配送方式</a>
						|
					</li>
					<li>
						<a >SHOP++官网</a>
						|
					</li>
					<li>
						<a>SHOP++论坛</a>
						
					</li>
		</ul>
	</div>
	<div class="span24">
		<div class="copyright">Copyright © 2005-2015 网上商城 版权所有</div>
	</div>
</div>

<script type="text/javascript">

	//省市二级联动
		var arr = new Array(4);
			arr[0] = ["江苏","南京","常州","苏州","无锡","镇江"];
			arr[1] = ["山东","潍坊","泰山","济南","滕州"];
			arr[2] = ["浙江","杭州","宁波","温州","嘉兴"];
			arr[3] = ["辽宁","辽阳","沈阳","大连","吉林"];
		function change(valprovince){
			
			var cityid = document.getElementById("cityid");
			var cityoptions = cityid.getElementsByTagName("option");

			for(var k=0;k<cityoptions.length;k++){
				var cityoption = cityoptions[k];
				cityid.removeChild(cityoption);
				k--;//不要忘了！！
			}
			
			   for(var i=0;i<arr.length;i++){
					//得到数组中的每一个元素
					var arrtemp = arr[i];
					//得到元素中的“省份”
					var arrprovince = arrtemp[0];
					//进行判断，是的话
					if(arrprovince==valprovince){
						//遍历其后面的城市元素
						for(var j=1;j<arrtemp.length;j++){
							var arrcity = arrtemp[j];
							//alert(arrcity);
						//进行添加操作
							//创建新option
							var optionnew = document.createElement("option");
							//创建新文本
							var textnew = document.createTextNode(arrcity);
							//将新文本添加到新option中		
							optionnew.appendChild(textnew);
							//将option添加到city中去
							cityid.appendChild(optionnew);
						}
					}
			   
			   }

		}
	
	</script>

</body>
</html>